{% extends "base.html" %}
{% block content %}


<form action="" method="post" name="view_school" enctype="multipart/form-data">
    {{form.hidden_tag()}}

    <div class="row">
        <div class="col-lg-5 col-xs-10">
            {{ render_field(form.title, size=50)}}
        </div>
        <div class="col-lg-5 col-xs-10">
            {{ render_field(form.address, size=50)}}
        </div>
        <div class="col-lg-5 col-xs-10">
            {{ render_field(form.residential_id)}}
        </div>
        <div class="col-lg-5 col-xs-10">
            {{ render_field(form.area_id)}}
        </div>
        <div class="col-lg-5 col-xs-10">
            {{ render_field(form.contacts)}}
        </div>
        <div class="col-lg-5 col-xs-10">
            {{ render_field(form.phone_number)}}
        </div>
        <div class="col-lg-5 col-xs-10">
            {{ render_field(form.decorate_type)}}
        </div>
        <div class="col-lg-5 col-xs-10">
            {{ render_field(form.size,size = 8)}}
            <div class="ui basic label">m² </div>
        </div>
        <div class="col-lg-5 col-xs-5">
            {{ render_field(form.price, size = 8)}}
            <div class="ui basic label">元/月</div>
        </div>
        <div class="col-lg-5 col-xs-10">
            {{ render_field(form.mode_id)}}
        </div>
        <div class="col-lg-5 col-xs-10">
            {{ render_field(form.rent_type)}}
        </div>
        <div class="col-lg-5 col-xs-5">
            {{ render_field(form.subway_line)}}
        </div>

        <div class="col-lg-10 col-xs-10">
            {{ render_field(form.image, accept="image/png, image/jpeg")}}
            <p><input type="submit" value="上传" name="upload"> 注：接受jpg和png格式的图片，建议图片分辨率1000x800</p>
        </div>
    </div>


    {{form.message}}
    <div class='box box-default'>
        <div class='box-header with-border'>
            <h3 class='box-title'><i class="fa fa-tag"></i> 已经上传的图片</h3>
        </div>
        <div class='box-body'>
            <div class='row'>

                {% if form.images %}
                <div class='ui small images'>
                    {% for image in form.images %}
                    <!-- <h4 class='text-center'>Primary</h4> -->
                    <img src='{{"/bd/web/static/"+image}}' alt='{{image}}' height="200" width="200"/>
                    {% endfor %}
                </div><!-- /.col -->
                {% endif %}


            </div><!-- /.row -->
        </div><!-- /.box-body -->
    </div><!-- /.box -->


    <p><input type="submit" value="确定" name="confirm"></p>
</form>
{% endblock %}
